<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>预约信息</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f9f9f9;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            overflow: hidden; /* Prevent scrolling on the body itself */
        }
        .container {
            width: 393px;
            height: 853px;
            max-width: 100%;
            padding: 10px;
            box-sizing: border-box;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
        }
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            background-color: #ddd;
            border-bottom: 1px solid #ddd;
        }
        .header h1 {
            font-size: 18px;
            margin: 0;
            text-align: center;
        }
        .header button {
            padding: 8px 12px;
            border: none;
            background-color: #c1bebe;
            color: black;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }
        .header button:hover {
            background-color: #0056b3;
        }
        .appointment-container {
            overflow-y: auto;
            flex-grow: 1; /* Allow the content area to expand and fill remaining space */
            padding: 10px 0;
        }
        .appointment {
            border: 1px solid #ddd;
            border-radius: 8px;
            margin-bottom: 15px;
            padding: 15px;
            background-color: #fff;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }
        .appointment img {
            width: 100%;
            height: 180px;
            object-fit: cover;
            border-radius: 8px;
            margin-bottom: 10px;
        }
        .appointment h3, .appointment p {
            margin: 0 0 5px;
            font-size: 14px;
            color: #333;
            text-align: center;
        }
        /* 弹出框的样式 */
        .confirmation-modal {
            position: fixed; /* 固定在屏幕上 */
            top: 50%; /* 垂直居中 */
            left: 50%; /* 水平居中 */
            transform: translate(-50%, -50%); /* 精确居中 */
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            width: 300px;
            text-align: center;
            display: none; /* 默认不显示 */
            z-index: 9999; /* 确保它在其他元素之上 */
        }

        .confirmation-modal button {
            margin-top: 10px;
            padding: 8px 12px;
            border: none;
            background-color: #0056b3;
            color: white;
            border-radius: 4px;
            cursor: pointer;
        }

        .confirmation-modal button:hover {
            background-color: #004085;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>已完成门票</h1>
            <button onclick="window.location.href='/order'">返回</button>
        </div>
        <div class="appointment-container">
            {% for appointment, spot in appointments %}
            <div class="appointment">
                <img src="{{ url_for('static', filename='images/' + spot.image_url) }}" alt="{{ spot.name }}">
                <h3>景区名称: {{ spot.name }}</h3>
                <p>旅客姓名: {{ appointment.traveler_name }}</p>
                <p>身份证号: {{ appointment.id_card }}</p>
                <p>票型: {{ appointment.ticket_type }}</p>
                <p>预约日期: {{ appointment.date }}</p>
                <p>预约时间: {{ appointment.time }}</p>
            </div>
            {% endfor %}
        </div>
    </div>

    
</body>
</html>
